package com.chendx.store.user.config;

import com.chendx.store.user.netty.CustomerNettyServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by chendx on 2021/9/29.
 */
@Configuration
public class CustomerNettyConfig {

    @Bean
    public CustomerNettyServer createOrderNettyServer(){
        CustomerNettyServer customerNettyServer = new CustomerNettyServer();

        new Thread(){
            @Override
            public void run(){
                customerNettyServer.start(7890);
            }
        }.start();
        return customerNettyServer;
    }
}
